<?php echo $this->doctype() ?>
<html>
    <head>
        <?php echo $this->headMeta() ?>
        <?php echo $this->headTitle() ?>
        <?php echo $this->headLink() ?>
        <?php echo $this->headStyle() ?>
        <?php echo $this->headScript() ?>
		<?php echo $this->headLink() ?>
    </head>
    <body>
        <?PHP
        $msg = '';
        foreach ($this->priorityMessenger() as $title=>$messages) {
            foreach ($messages as $message) {
                $msg .= $title . ';' . $message . '|';
            }
        }
        echo '<input type="hidden" id="flash-messages" value="' . $msg . '"/>';
        ?>
<div id="wrapper">
	<div id="header">
		
			<div class="logo">
				<div class="img-logo">
					<img src=<?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/img/logo.png' ?>>
				</div>
			
				<div class="login">
					<p>
						<a href=#" id="login">Login</a> | <a href="#" id="cadastro">Cadastro</a>
					</p>
				</div>
			</div>
			
	</div>
	<div id="page">
			<div id="container">
				<ul id="nav">
				<div id="menu" >
					<li id="selected"><a href="<?PHP echo $this->url(array('module' => 'default', 'controller' => 'index'), null, true); ?>">Início</a></li>
					<li><a href="<?PHP echo $this->url(array('module' => 'default', 'controller' => 'sobre'), null, true); ?>">Sobre nós</a></li>
					<li><a href="<?PHP echo $this->url(array('module' => 'default', 'controller' => 'galeria'), null, true); ?>">Galeria</a></li>
					<li><a href="<?PHP echo $this->url(array('module' => 'default', 'controller' => 'patrocinadores'), null, true); ?>">Patrocinadores</a></li>
					<li><a href="<?PHP echo $this->url(array('module' => 'default', 'controller' => 'contato'), null, true); ?>">Contato</a></li>
					<?php if(Misc::isLogged()):?>
					<li><a href="<?PHP echo $this->url(array('module' => 'default', 'controller' => 'membros'), null, true); ?>">Membros</a></li>
					<?php if(Misc::isAdmin()):?>
						<li><a href="<?PHP echo $this->url(array('module' => 'admin'), null, true); ?>">Admin</a></li>
						<li><a href="<?PHP echo $this->url(array('module' => 'default', 'controller' => 'login', 'action' => 'logout'), null, true); ?>">Sair</a></li>
					<?php endif; ?>
					<?php endif; ?>
					</ul>
				</div>
			</div>
			<div id="content">
					<?php echo $this->layout()->content ?>
			</div>
		
	</div>

<div id="footer">
	    <div class="login">     
			<form id="login-form" method="post" action="<?PHP echo $this->url(array('controller' => 'login'), null, true); ?>">
				<input type="text" name="usuario" value="Usuário" alt="Usuário" class="campo-redondo"/>
				<input type="password" name="senha" value="Senha" alt="Senha" class="campo-redondo"/>
				<input type="submit" value="Login" class="botao-login"/> 
			</form>
		</div>	

		<div class="footer-info">
			<div class="left-skull">
				<img src=<?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/img/caveira.png' ?>>
			</div>
			
			<div class="right-skull">
				<img src=<?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/img/caveira.png' ?>>
		
			</div>
		</div>	
		<div class="beetwen-skull">
			<p>
				Equi Piratas - 2011 - Igrejinha - RS
			</p>
		</div>
	</div>	
</div>
	
	
    </body>
	<script>
		$('#nav').spasticNav();
	</script>
</html>